//
//  UIColor+Extension.m
//  FreeMark
//
//  Created by gaopr on 2019/2/17.
//  Copyright © 2019年 gaopr. All rights reserved.
//

#import "UIColor+Extension.h"

@implementation UIColor (Extension)

+ (UIColor *)fm_colorWithHex:(NSInteger)hexRGB
{
    return [UIColor colorWithRed:((float)((hexRGB & 0xFF0000) >> 16))/255.0
                           green:((float)((hexRGB & 0xFF00) >> 8))/255.0
                            blue:((float)(hexRGB & 0xFF))/255.0
                           alpha:1.0];
}

+ (UIColor *)fm_randomColor
{
    return [UIColor colorWithRed:((float)(arc4random() % 255))/255.0
                           green:((float)(arc4random() % 255))/255.0
                            blue:((float)(arc4random() % 255))/255.0
                           alpha:1.0];
}

@end
